Optimal. Leaf size=113 \[ \frac {a^2 (3 A b-4 a B) x}{b^5}-\frac {a (2 A b-3 a B) x^2}{2 b^4}+\frac {(A b-2 a B) x^3}{3 b^3}+\frac {B x^4}{4 b^2}-\frac {a^4 (A b-a B)}{b^6 (a+b x)}-\frac {a^3 (4 A b-5 a B) \log (a+b x)}{b^6} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {78}
\begin {gather*} -\frac {a^4 (A b-a B)}{b^6 (a+b x)}-\frac {a^3 (4 A b-5 a B) \log (a+b x)}{b^6}+\frac {a^2 x (3 A b-4 a B)}{b^5}-\frac {a x^2 (2 A b-3 a B)}{2 b^4}+\frac {x^3 (A b-2 a B)}{3 b^3}+\frac {B x^4}{4 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rubi steps
\begin {align*} \int \frac {x^4 (A+B x)}{(a+b x)^2} \, dx &=\int \left (-\frac {a^2 (-3 A b+4 a B)}{b^5}+\frac {a (-2 A b+3 a B) x}{b^4}+\frac {(A b-2 a B) x^2}{b^3}+\frac {B x^3}{b^2}-\frac {a^4 (-A b+a B)}{b^5 (a+b x)^2}+\frac {a^3 (-4 A b+5 a B)}{b^5 (a+b x)}\right ) \, dx\\ &=\frac {a^2 (3 A b-4 a B) x}{b^5}-\frac {a (2 A b-3 a B) x^2}{2 b^4}+\frac {(A b-2 a B) x^3}{3 b^3}+\frac {B x^4}{4 b^2}-\frac {a^4 (A b-a B)}{b^6 (a+b x)}-\frac {a^3 (4 A b-5 a B) \log (a+b x)}{b^6}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 107, normalized size = 0.95 \begin {gather*} \frac {-12 a^2 b (-3 A b+4 a B) x+6 a b^2 (-2 A b+3 a B) x^2+4 b^3 (A b-2 a B) x^3+3 b^4 B x^4+\frac {12 a^4 (-A b+a B)}{a+b x}+12 a^3 (-4 A b+5 a B) \log (a+b x)}{12 b^6} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 116, normalized size = 1.03
method | result | size |
default | \(\frac {\frac {1}{4} b^{3} B \,x^{4}+\frac {1}{3} A \,b^{3} x^{3}-\frac {2}{3} B a \,b^{2} x^{3}-a A \,b^{2} x^{2}+\frac {3}{2} B \,a^{2} b \,x^{2}+3 a^{2} A b x -4 a^{3} B x}{b^{5}}-\frac {a^{3} \left (4 A b -5 B a \right ) \ln \left (b x +a \right )}{b^{6}}-\frac {a^{4} \left (A b -B a \right )}{b^{6} \left (b x +a \right )}\) | \(116\) |
norman | \(\frac {\frac {B \,x^{5}}{4 b}-\frac {a \left (4 A \,a^{3} b -5 B \,a^{4}\right )}{b^{6}}+\frac {\left (4 A b -5 B a \right ) x^{4}}{12 b^{2}}-\frac {a \left (4 A b -5 B a \right ) x^{3}}{6 b^{3}}+\frac {a^{2} \left (4 A b -5 B a \right ) x^{2}}{2 b^{4}}}{b x +a}-\frac {a^{3} \left (4 A b -5 B a \right ) \ln \left (b x +a \right )}{b^{6}}\) | \(118\) |
risch | \(\frac {B \,x^{4}}{4 b^{2}}+\frac {A \,x^{3}}{3 b^{2}}-\frac {2 B a \,x^{3}}{3 b^{3}}-\frac {a A \,x^{2}}{b^{3}}+\frac {3 B \,a^{2} x^{2}}{2 b^{4}}+\frac {3 a^{2} A x}{b^{4}}-\frac {4 a^{3} B x}{b^{5}}-\frac {4 a^{3} \ln \left (b x +a \right ) A}{b^{5}}+\frac {5 a^{4} \ln \left (b x +a \right ) B}{b^{6}}-\frac {a^{4} A}{b^{5} \left (b x +a \right )}+\frac {a^{5} B}{b^{6} \left (b x +a \right )}\) | \(133\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 123, normalized size = 1.09 \begin {gather*} \frac {B a^{5} - A a^{4} b}{b^{7} x + a b^{6}} + \frac {3 \, B b^{3} x^{4} - 4 \, {\left (2 \, B a b^{2} - A b^{3}\right )} x^{3} + 6 \, {\left (3 \, B a^{2} b - 2 \, A a b^{2}\right )} x^{2} - 12 \, {\left (4 \, B a^{3} - 3 \, A a^{2} b\right )} x}{12 \, b^{5}} + \frac {{\left (5 \, B a^{4} - 4 \, A a^{3} b\right )} \log \left (b x + a\right )}{b^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.99, size = 164, normalized size = 1.45 \begin {gather*} \frac {3 \, B b^{5} x^{5} + 12 \, B a^{5} - 12 \, A a^{4} b - {\left (5 \, B a b^{4} - 4 \, A b^{5}\right )} x^{4} + 2 \, {\left (5 \, B a^{2} b^{3} - 4 \, A a b^{4}\right )} x^{3} - 6 \, {\left (5 \, B a^{3} b^{2} - 4 \, A a^{2} b^{3}\right )} x^{2} - 12 \, {\left (4 \, B a^{4} b - 3 \, A a^{3} b^{2}\right )} x + 12 \, {\left (5 \, B a^{5} - 4 \, A a^{4} b + {\left (5 \, B a^{4} b - 4 \, A a^{3} b^{2}\right )} x\right )} \log \left (b x + a\right )}{12 \, {\left (b^{7} x + a b^{6}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.24, size = 119, normalized size = 1.05 \begin {gather*} \frac {B x^{4}}{4 b^{2}} + \frac {a^{3} \left (- 4 A b + 5 B a\right ) \log {\left (a + b x \right )}}{b^{6}} + x^{3} \left (\frac {A}{3 b^{2}} - \frac {2 B a}{3 b^{3}}\right ) + x^{2} \left (- \frac {A a}{b^{3}} + \frac {3 B a^{2}}{2 b^{4}}\right ) + x \left (\frac {3 A a^{2}}{b^{4}} - \frac {4 B a^{3}}{b^{5}}\right ) + \frac {- A a^{4} b + B a^{5}}{a b^{6} + b^{7} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.65, size = 175, normalized size = 1.55 \begin {gather*} \frac {{\left (b x + a\right )}^{4} {\left (3 \, B - \frac {4 \, {\left (5 \, B a b - A b^{2}\right )}}{{\left (b x + a\right )} b} + \frac {12 \, {\left (5 \, B a^{2} b^{2} - 2 \, A a b^{3}\right )}}{{\left (b x + a\right )}^{2} b^{2}} - \frac {24 \, {\left (5 \, B a^{3} b^{3} - 3 \, A a^{2} b^{4}\right )}}{{\left (b x + a\right )}^{3} b^{3}}\right )}}{12 \, b^{6}} - \frac {{\left (5 \, B a^{4} - 4 \, A a^{3} b\right )} \log \left (\frac {{\left | b x + a \right |}}{{\left (b x + a\right )}^{2} {\left | b \right |}}\right )}{b^{6}} + \frac {\frac {B a^{5} b^{4}}{b x + a} - \frac {A a^{4} b^{5}}{b x + a}}{b^{10}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.32, size = 173, normalized size = 1.53 \begin {gather*} x\,\left (\frac {2\,a\,\left (\frac {2\,a\,\left (\frac {A}{b^2}-\frac {2\,B\,a}{b^3}\right )}{b}+\frac {B\,a^2}{b^4}\right )}{b}-\frac {a^2\,\left (\frac {A}{b^2}-\frac {2\,B\,a}{b^3}\right )}{b^2}\right )+x^3\,\left (\frac {A}{3\,b^2}-\frac {2\,B\,a}{3\,b^3}\right )-x^2\,\left (\frac {a\,\left (\frac {A}{b^2}-\frac {2\,B\,a}{b^3}\right )}{b}+\frac {B\,a^2}{2\,b^4}\right )+\frac {\ln \left (a+b\,x\right )\,\left (5\,B\,a^4-4\,A\,a^3\,b\right )}{b^6}+\frac {B\,x^4}{4\,b^2}+\frac {B\,a^5-A\,a^4\,b}{b\,\left (x\,b^6+a\,b^5\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________